# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Contributor: Maxim Karasev <begs@disroot.org>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py3-pluggy
_pkgname=pluggy
pkgver=1.0.0
pkgrel=0
pkgdesc="Plugin management and hook calling for Python"
# Needs py3-pytest for checkdepends, which require py3-pluggy
# in depends, so disable here to break a circular dependency
options="!check"
url="https://pluggy.readthedocs.io/en/latest/"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools py3-wheel"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
	eliminate-setuptools_scm.patch
	"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	rm tox.ini
	python3 -m pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}


sha512sums="
cf0bcbb4330c24ce473614befa19548f33fb39fa0ad094e1eae786202d7adadc28e16499f80ab96b630091765404ca5c5b6f9a55bc605e03514d8ab50cf9ae00  pluggy-1.0.0.tar.gz
08ec25cbe7dcdc7e81e8fd3de9e6e7d91f490011a5314cea4d3bc3e44b03d921847a7587ccb3292ada22f6e1d499072b98e7d54846fe1216aabc6359bf4a3f5f  eliminate-setuptools_scm.patch
"
